package org.jeecg.common.modules.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.commons.lang3.tuple.MutableTriple;
import org.jeecg.common.modules.order.entity.PayOrder;
import org.jeecg.common.util.enums.OrderTypeEnum;

/**
 * @Description: pay_order
 * @Author: jeecg-boot
 * @Date:   2020-08-26
 * @Version: V1.0
 */
public interface IPayOrderService extends IService<PayOrder> {

    /**
     * 新增一条退款记录
     * @param order
     * @return
     */
    MutableTriple<Boolean,String,PayOrder> initRefund(PayOrder order);

    /**
     * 创建一个支付订单
     * @param doctorId
     * @param wxUserinfoId
     * @param amount
     * @param orderType
     * @return
     */
    PayOrder initPayOrder(String doctorId,String relationId, String wxUserinfoId, Long amount, OrderTypeEnum orderType);

    PayOrder initPayOrderSP(String doctorId, String relationId, Long amount, OrderTypeEnum orderType, String openid, Integer shopType, String medicalId);

    /**
     * 根据订单号获取
     * @param orderCode
     * @return
     */
    PayOrder getByOrderCode(String orderCode);

}
